#include<stdio.h>
int main()
{
    int t;
    scanf("%d",&t);
    while(t--)
    {
        double u,v,w,l;
        double t;
        scanf("%lf%lf%lf%lf",&u,&v,&w,&l);
        t = l/(u+v);
        printf("%.3lf\n",w*t);
    }
    return 0;
}